Coalgebraic semantics for logic programs
نویسنده
چکیده
General logic programs with negation have the 3-valued minimal Herbrand models based on the Kripke’s fixpoint knowledge revision operator and on Clark’s completion. Based on these results we deifine a new algebra , (with the relational algebra embedded in it), and present an algorithmic transformation of logic programs into the system of tuple-variable equations which is a -coalgebra. The solution of any such system of equations (a -coalgebra) corresponds to the unique homomorphism from this -coalgebra into the final -coalgebra, which is just the coalgebraic semantics for logic programs. It is shown that such unique solution corresponds to the minimal Herbrand model of annotated version of logic programs and is closely related to the encapsulation of multi-valued logic programs into the 2-valued annotated logic programs.
منابع مشابه
Coalgebraic Semantics for Parallel Derivation Strategies in Logic Programming
Logic programming, a class of programming languages based on first-order logic, provides simple and efficient tools for goal-oriented proof-search. Logic programming supports recursive computations, and some logic programs resemble the inductive or coinductive definitions written in functional programming languages. In this paper, we give a coalgebraic semantics to logic programming. We show th...
متن کاملCoalgebras and monads in the semantics of Java
This paper describes the basic structures in the denotational and axiomatic semantics of sequential Java, both from a monadic and a coalgebraic perspective. This semantics is an abstraction of the one used for the verification of (sequential) Java programs using proof tools in the LOOP project at the University of Nijmegen. It is shown how the monadic perspective gives rise to the relevant comp...
متن کاملCoalgebraic Logic Programming: from Semantics to Implementation
Coinductive definitions, such as that of an infinite stream, may often be described by elegant logic programs, but ones for which SLD-refutation is of no value as SLD-derivations fall into infinite loops. Such definitions give rise to questions of lazy corecursive derivations and parallelism, as execution of such logic programs can have both recursive and corecursive features at once. Observati...
متن کاملExploiting Parallelism in Coalgebraic Logic Programming
We present a parallel implementation of Coalgebraic Logic Programming (CoALP) in the programming language Go. CoALP was initially introduced to reflect coalgebraic semantics of logic programming, with coalgebraic derivation algorithm featuring both corecursion and parallelism. Here, we discuss how the coalgebraic semantics influenced our parallel implementation of logic programming.
متن کاملCoalgebraic Modal Logic in CoCasl
We extend the algebraic-coalgebraic specification language CoCasl by full coalgebraic modal logic based on predicate liftings for functors. This logic is more general than the modal logic previously used in CoCasl and supports the specification of a variety of modal logics, such as graded modal logic, majority logic, and probabilistic modal logic. CoCasl thus becomes a modern modal language tha...
متن کامل